#!/usr/bin/env python3
# -*- coding: utf-8 -*-

""" 矩阵的合并 """

__auther__ = 'igofishing'


import numpy as np


a = np.linspace(4, 16, 6)
b = np.linspace(16, 28, 6)

print(a)
print(a.shape)
# print(b)

c = np.vstack((a, b))

print(c)
print(c.shape)


print('-------------------------------')

d = np.arange(12).reshape((4, 3))

print(d)
print('矩阵等量分割', np.split(d, 3, axis=1))

print('矩阵不等量分割', np.array_split(d, 2, axis=1))

print('纵向等量分割', np.vsplit(d, 2))
print('横向等量分割', np.hsplit(d, 3))


# numpy 复制矩阵

e = np.arange(20).reshape((4, 5))

print(e)

# 深度copy

f = e.copy()

print(f)
